package com.chenziwen.scala.chapter06

object Scala_Trait1 {
  def main(args: Array[String]): Unit = {
    val console = new Console
    console.log()
  }
}

trait Logger {
  def log()
}

// 所有的Java接口都可以当做Scala特质使用，继承的是多个接口/特质的整体
class Console extends Logger with Cloneable with Serializable {
  override def log(): Unit = {
    println("console log ...")
  }
}

